<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="my" uri="mytag" %> 
<html> 
<head> 
	<link rel="stylesheet" type="text/css" href="../easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../easyui/themes/icon.css">
	<script type="text/javascript" src="../easyui/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="../easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../js/kaoqin.js"></script>
	<script type="text/javascript" src="../js/common.js"></script>
	
	<link rel="stylesheet" type="text/css" href="../css/common.css">
	<link rel="stylesheet" type="text/css" href="../css/table.css">
<style type="text/css">
</style>
</head> 
<body>
<table width="80%" border="0" cellspacing="0"  align="center" cellpadding="0" class="ListTable">
	<thead>
	<tr>
		<td align="center"  class="TableRow" nowrap>员工姓名</td>
		<td align="center"  class="TableRow" nowrap>签到时间</td>
		<td align="center"  class="TableRow" nowrap>签退时间</td>
		<td align="center"  class="TableRow" nowrap>打卡日期</td>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${kaoqins}" var="kaoqin">
	<tr class="trShallow">
		<td align="center" class="RecordRow" nowrap>
				<c:set value = "${kaoqin.user_id }"  var = "userId" />    
				${my:getUserName(userId)}
		</td>
		<td align="center" class="RecordRow" nowrap>  
		<c:set var="workOn">
			<fmt:formatDate value="${kaoqin.shangban}" type="time"/>
		</c:set>
		
		<c:choose>
			<c:when test="${workOn > shangban }">
				<font color="red"><fmt:formatDate value="${kaoqin.shangban}" type="time"/></font>
			</c:when>
			<c:otherwise>
				<fmt:formatDate value="${kaoqin.shangban}" type="time"/>
			</c:otherwise>
		</c:choose>
		
		</td>
		<td align="center" class="RecordRow" nowrap>
		<c:set var="workOff">
			<fmt:formatDate value="${kaoqin.xiaban}" type="time"/>
		</c:set>
		<c:choose>
			<c:when test="${workOff < xiaban }">
				<font color="red"><fmt:formatDate value="${kaoqin.xiaban}" type="time"/></font>
			</c:when>
			<c:otherwise>
				<fmt:formatDate value="${kaoqin.xiaban}" type="time"/>
			</c:otherwise>
		</c:choose>
		</td>
		<td align="center" class="RecordRow" nowrap>
			<fmt:formatDate value="${kaoqin.dakadate}" type="date" dateStyle="default"/>
		</td>
	</tr>
	</c:forEach>
	<tbody>	
</table>
<table  width="80%" align="center" class="RecordRowP">
		<tr>
		    <td valign="bottom" class="tdFontcolor">
		            第1 页 共${fn:length(kaoqins)}条 共 1 页
			</td>
	              <td  align="right" nowrap class="tdFontcolor">
		          <p align="right">
		          <input type="hidden" name="listpagination" value="baseNetSignInForm">
		          <input type="hidden" name="current" value="1">
		          <input type="hidden" name="paginationDbAction" value="">首页&nbsp上页&nbsp下页&nbsp末页&nbsp第
		          <input type=text size='2' name='pageSelect' value='' onkeypress='checkNumber(this,event)'/>页&nbsp
		          <a href="#" onclick="">
		          <img src="../images/go.gif" border=0 ></a>
			</td>
		</tr>
    
  </table> 
  <table  width="80%" align="center">
		<tr>
		    <td align="center">	
		    <c:if test="${kaoqin ==true}">
		        <input type="button" class="mybutton" value='签到' onclick="kaoqin('on')"/> 
		        <input type="button" class="mybutton" value='签退' onclick="kaoqin('off')"/> 
		     </c:if>  
		     <c:if test="${config ==true}">
		     <input type="button" class="mybutton" value='设置上下班时间' onclick="openWin('kaoqinConfig.html')"/> 
		     </c:if>
			</td>
		</tr>
  </table>
</body>
</html>